home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1994 August / August CD.bin / Shareware / Utilities / BreakBefore / Read me now or pay later! < prev   
Text File  |  1994-06-05  |  2KB  |  44 lines

  1. BreakBefore
  2.  
  3. Charlie Reiman -- April 17, 1994
  4.  
  5. This qualifies as one of my sneakiest hacks ever. BreakBefore is a system 
  6. extension for extension writers. It allows you to break into macsbug on 
  7. the very first instruction of the INIT code of ANY extension you choose.
  8.  
  9. To use:
  10.  
  11. 1) Pick the extension or control panel you wish to debug.
  12. 2) Copy BreakBefore into the same folder.
  13. 3) Paste the name of the debugging target onto the copy of BreakBefore, 
  14. and delete the last letter of the new name. (For example, if you want to 
  15. break on entry to "Scrolling 7.0.1", put BreakBefore into Control Panels, 
  16. and name the copy "Scorlling 7.0.") If you view the folder by name, the 
  17. copy of BreakBefore should appear immediately preceeding the target 
  18. extension.
  19. 4) Reboot.  Macsbug will flicker once, then break for good on the first 
  20. instruction of the target extension. 
  21. 5) You can just hit "G" and the target should load normally, if its not 
  22. doing something strange.
  23. 6) To permanently remove BreakBefore, throw out the installed copy.
  24.  
  25. This is a fairly safe hack. I've been using it on and off for a year. I 
  26. strongly suggest you open up the source code and decipher the program. 
  27. You shouldn't use it if you don't understand it. 
  28.  
  29. Be warned that this will lose badly if apple changes the way it calls INIT 
  30. code, apple changes the mechanism I use to communicate to Macsbug, or if 
  31. everything suddenly goes native overnight.  Also, if the target has no init 
  32. code, BreakBefore will break on the first instruction of the next thing 
  33. that does have init code.  Running BreakBefore as the last item in the boot 
  34. process is a very bad idea.
  35.  
  36. BreakBefore and the enclosed source code are public domain.
  37.  
  38. Break a leg,
  39.  
  40. Charlie Reiman
  41. creiman@netcom.com
  42.  
  43.  
  44.